import 'package:backend.lexical_item_images/domain/use_cases/change_lexical_item_image/use_case.dart';
import 'package:backend.lexical_item_images/domain/use_cases/delete_lexical_item_image/use_case.dart';
import 'package:backend.lexical_item_images/infrastructure/controllers/lexical_item_image_change_controller/controller.dart';
import 'package:backend.lexical_item_images/infrastructure/controllers/lexical_item_image_deletion_controller/controller.dart';
import 'package:get_it/get_it.dart';

final sl = GetIt.asNewInstance();

Future<void> init() async {
  // use cases

  sl.registerLazySingleton<ChangeLexicalItemImage>(() {
    return const ChangeLexicalItemImageImpl();
  });

  sl.registerLazySingleton<DeleteLexicalItemImage>(() {
    return const DeleteLexicalItemImageImpl();
  });

  // controllers

  sl.registerLazySingleton<LexicalItemImageChangeController>(() {
    return LexicalItemImageChangeControllerImpl(
      changeLexicalItemImage: sl(),
    );
  });

  sl.registerLazySingleton<LexicalItemImageDeletionController>(() {
    return LexicalItemImageDeletionControllerImpl(
      deleteLexicalItemImage: sl(),
    );
  });
}
